package com.jeehentor.generate.utils;

import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;

import java.io.IOException;

/**
 * @Description : TODO
 * @Author : wzd
 * @Date : 2024/5/17 15:53
 * @Version : 1.0
 **/
public class JsonToStringDeserializer extends JsonDeserializer<String> {
    @Override
    public String deserialize(JsonParser jsonParser, DeserializationContext deserializationContext)
            throws IOException {
        return jsonParser.readValueAsTree().toString();
    }
}